
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<script src="${ctx}/resources/plugin/ajaxFileupload/jquery.form.js"></script>
<script type="text/javascript">
	function goImage(obj) {
		var url = obj.src;
		console.log("url的值为" + url);
		window.open(url);
	}

</script>
<div class="bjui-pageContent" style="background: #FFF;">
	<form id="merchantForm" action="${ctx}/bus/merchant/editSave"
		class="ajaxForm" data-toggle="validate" enctype="multipart/form-data">
		<input type="hidden" name="id" id="id" value="${dataResult.id }">
		<input type="hidden" name="status" id="status" value="${dataResult.status}"> 
		<table class="table table-condensed table-hover">
			<tbody>
				<tr style="height: 30px;">
					<td><label for="name" class="control-label x90">商户名称：</label>
						<input class="" id="merchantName" type="text" name="merchantName"
						readonly value="${dataResult.merchantName}" data-rule="required;" /></td>
					<td><label for="name" class="control-label x90">联系电话：</label>
						<c:if test="${flag=='edit' }">
							<input class="" id="name" type="text" name="phone" value="${dataResult.phone}" data-rule="required;" />
						</c:if>
						<c:if test="${flag=='view' }">
							<input class="" id="name" type="text" name="phone"  readonly value="${dataResult.phone}" data-rule="required;" />
						</c:if>
					</td>
				</tr>
		
				<tr style="height: 30px;">
					<td><label for="name" class="control-label x90">企业名称：</label>
						<input class="" id="enterpriseName" type="text" name="enterpriseName" readonly
						value="${dataResult.enterpriseName}" data-rule="required;" /></td>
					<td><label for="name" class="control-label x90">信用代码：</label>
						<input class="" id="country" type="text" name="creditCode" readonly
						value="${dataResult.creditCode}" data-rule="required;" /></td>
				</tr>
				<tr style="height: 30px;">
					<td><label for="name" class="control-label x90">企业邮箱：</label>
						<input class="" id="creditEmail" type="text" name="creditEmail" readonly
						value="${dataResult.creditEmail}" data-rule="required;" /></td>
					<td><label for="name" class="control-label x90">注册号：</label>
						<input class="" id="registerNum" type="text" name="registerNum" readonly
						value="${dataResult.registerNum}" data-rule="required;" /></td>
				</tr>
				<tr style="height: 40px;">
					<td colspan="3"><label for="name" class="control-label x90">营业执照：</label>
						<img width="50px" name="imgUrl" id="imgUrl" src="${ctx }/${dataResult.businessLicensePhoto}" onclick="goImage(this)" /></td>
				</tr>
				
				<tr style="height: 30px;">
					<td><label for="name" class="control-label x90">法人姓名：</label>
						<input class="" id="legalName" type="text" name="legalName" readonly
						value="${dataResult.legalName}" data-rule="required;" /></td>
					<td><label for="name" class="control-label x90">法人联系电话：</label>
						<c:if test="${flag=='edit' }">
							<input class="" id="legalPhone" type="text" name="legalPhone"  value="${dataResult.legalPhone}" data-rule="required;" />
						</c:if>	
						<c:if test="${flag=='view' }">
							<input class="" id="legalPhone" type="text" name="legalPhone" readonly value="${dataResult.legalPhone}" data-rule="required;" />
						</c:if>
					</td>
				</tr>
				<tr style="height: 40px;">
					<td colspan="3"><label for="name" class="control-label x90">法人身份证照片：</label>
						<img width="50px" name="imgUrl" id="imgUrl" src="${ctx }/${dataResult.legalIdFacePhoto}" onclick="goImage(this)" />
						<img width="50px" name="imgUrl" id="imgUrl" src="${ctx }/${dataResult.legalBackPhoto}" onclick="goImage(this)" />
					</td>
				</tr>
				<tr style="height: 30px;">
					<td><label for="name" class="control-label x90">注册日期：</label>
						<input class="" id="registerTime" type="text" name="registerTime" readonly
						value="<fmt:formatDate value='${dataResult.registerTime}' pattern="yyyy-MM-dd HH:mm:ss"/>" data-rule="required;" />
					</td>
					<td><label for="name" class="control-label x90">提现手续费（%）：</label>
						<c:if test="${flag=='edit' }">
							<input class="" id="cashPoundage" type="text" name="cashPoundage" value="${dataResult.cashPoundage}" data-rule="required;" />
						</c:if>
						<c:if test="${flag=='view' }">
							<input class="" id="cashPoundage" type="text" readonly name="cashPoundage" value="${dataResult.cashPoundage}" data-rule="required;" />
						</c:if>
					</td>
				</tr>
				<tr style="height: 20px;">
					<td colspan="3"><label for="name" class="control-label x90">经营范围：</label>
						<textarea cols="62" rows="4" readonly >${dataResult.manageScope}</textarea>
					</td>
				</tr>
				<tr style="height: 30px;">
					<td colspan="3"><label for="name" class="control-label x90">备注信息：</label>
						<c:if test="${flag=='edit' }">
							<textarea name="remark" id="remark"  rows="4" cols="62">${dataResult.remark}</textarea>
						</c:if>
						<c:if test="${flag=='view' }">
							<textarea name="remark" id="remark"  readonly rows="4" cols="62">${dataResult.remark}</textarea>
						</c:if>
					</td>
				</tr>
				</tr>
					<tr style="height: 30px;">
					<td colspan="3"><label for="name" class="control-label x90">审核记录:</label>
						 <table class="table table-bordered table-hover table-striped table-top">
					 		<thead>
								<tr>
									<td class="pass_width_ave_5_column">审核人员</td>
									<td class="pass_width_ave_5_column">审核结果</td>
									<td class="pass_width_ave_5_column">审核时间</td>
									<td class="pass_width_ave_5_column">审核意见</td>
								</tr>
							</thead>
							<tbody>
								<c:forEach  items="${ checkRecordList}" var="record">
									<tr>
										<td class="pass_width_ave_5_column">${record.checkUserName }</td>
										<td class="pass_width_ave_5_column">${record.isAgree==1?'未通过':'通过'}</td>
										<td class="pass_width_ave_5_column"><fmt:formatDate value='${record.checkTime}' pattern="yyyy-MM-dd HH:mm:ss"/></td>
										<td class="pass_width_ave_5_column">${record.handleOpinion}</td>
									</tr>
								</c:forEach>
							</tbody>
						 </table>
					</td>
				</tr>
			</tbody>
		</table>
	</form>
</div>
<div class="bjui-pageFooter">
	<ul>
		<li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
		<c:if test="${flag=='edit' }">
			<li><button type="submit" class="btn-default" data-icon="save">保存</button></li>
		</c:if>
	</ul>
</div>